//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS InternetMonitor service.
///
/// Amazon CloudWatch Internet Monitor provides visibility into how internet issues impact the performance and availability
/// 			between your applications hosted on Amazon Web Services and your end users. It can reduce the time it takes for you to diagnose
/// 			internet issues from days to minutes. Internet Monitor uses the connectivity data that Amazon Web Services captures from its global
/// 			networking footprint to calculate a baseline of performance and availability for internet traffic. This
/// 			is the same data that Amazon Web Services uses to monitor internet uptime and availability. With those measurements
/// 			as a baseline, Internet Monitor raises awareness for you when there are significant problems for your
/// 			end users in the different geographic locations where your application runs. Internet Monitor publishes internet measurements to CloudWatch Logs and CloudWatch Metrics,
/// 			to easily support using CloudWatch tools with health information for geographies and networks specific to your application.
/// 			Internet Monitor sends health events to Amazon EventBridge so that you can set up notifications. If an issue is caused by the Amazon Web Services network,
/// 			you also automatically receive an Amazon Web Services Health Dashboard notification with the steps that Amazon Web Services is taking to mitigate the problem. To use Internet Monitor, you create a monitor and associate your application's resources
/// 			with it - VPCs, NLBs, CloudFront distributions, or WorkSpaces directories - so Internet Monitor can determine
/// 			where your application's internet traffic is. Internet Monitor then provides internet measurements from Amazon Web Services that are specific to
/// 			the locations and ASNs (typically, internet service providers or ISPs) that communicate with your application. For more information, see Using Amazon CloudWatch Internet Monitor in the Amazon CloudWatch User Guide.
public struct InternetMonitor: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the InternetMonitor client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            serviceName: "InternetMonitor",
            serviceIdentifier: "internetmonitor",
            serviceProtocol: .restjson,
            apiVersion: "2021-06-03",
            endpoint: endpoint,
            serviceEndpoints: Self.serviceEndpoints,
            variantEndpoints: Self.variantEndpoints,
            errorType: InternetMonitorErrorType.self,
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }


    /// custom endpoints for regions
    static var serviceEndpoints: [String: String] {[
        "af-south-1": "internetmonitor.af-south-1.api.aws",
        "ap-east-1": "internetmonitor.ap-east-1.api.aws",
        "ap-northeast-1": "internetmonitor.ap-northeast-1.api.aws",
        "ap-northeast-2": "internetmonitor.ap-northeast-2.api.aws",
        "ap-northeast-3": "internetmonitor.ap-northeast-3.api.aws",
        "ap-south-1": "internetmonitor.ap-south-1.api.aws",
        "ap-south-2": "internetmonitor.ap-south-2.api.aws",
        "ap-southeast-1": "internetmonitor.ap-southeast-1.api.aws",
        "ap-southeast-2": "internetmonitor.ap-southeast-2.api.aws",
        "ap-southeast-3": "internetmonitor.ap-southeast-3.api.aws",
        "ap-southeast-4": "internetmonitor.ap-southeast-4.api.aws",
        "ap-southeast-5": "internetmonitor.ap-southeast-5.api.aws",
        "ap-southeast-7": "internetmonitor.ap-southeast-7.api.aws",
        "ca-central-1": "internetmonitor.ca-central-1.api.aws",
        "ca-west-1": "internetmonitor.ca-west-1.api.aws",
        "cn-north-1": "internetmonitor.cn-north-1.api.amazonwebservices.com.cn",
        "cn-northwest-1": "internetmonitor.cn-northwest-1.api.amazonwebservices.com.cn",
        "eu-central-1": "internetmonitor.eu-central-1.api.aws",
        "eu-central-2": "internetmonitor.eu-central-2.api.aws",
        "eu-north-1": "internetmonitor.eu-north-1.api.aws",
        "eu-south-1": "internetmonitor.eu-south-1.api.aws",
        "eu-south-2": "internetmonitor.eu-south-2.api.aws",
        "eu-west-1": "internetmonitor.eu-west-1.api.aws",
        "eu-west-2": "internetmonitor.eu-west-2.api.aws",
        "eu-west-3": "internetmonitor.eu-west-3.api.aws",
        "il-central-1": "internetmonitor.il-central-1.api.aws",
        "me-central-1": "internetmonitor.me-central-1.api.aws",
        "me-south-1": "internetmonitor.me-south-1.api.aws",
        "mx-central-1": "internetmonitor.mx-central-1.api.aws",
        "sa-east-1": "internetmonitor.sa-east-1.api.aws",
        "us-east-1": "internetmonitor.us-east-1.api.aws",
        "us-east-2": "internetmonitor.us-east-2.api.aws",
        "us-gov-east-1": "internetmonitor.us-gov-east-1.api.aws",
        "us-gov-west-1": "internetmonitor.us-gov-west-1.api.aws",
        "us-west-1": "internetmonitor.us-west-1.api.aws",
        "us-west-2": "internetmonitor.us-west-2.api.aws"
    ]}


    /// FIPS and dualstack endpoints
    static var variantEndpoints: [EndpointVariantType: AWSServiceConfig.EndpointVariant] {[
        [.dualstack]: .init(endpoints: [
            "af-south-1": "internetmonitor.af-south-1.api.aws",
            "ap-east-1": "internetmonitor.ap-east-1.api.aws",
            "ap-northeast-1": "internetmonitor.ap-northeast-1.api.aws",
            "ap-northeast-2": "internetmonitor.ap-northeast-2.api.aws",
            "ap-northeast-3": "internetmonitor.ap-northeast-3.api.aws",
            "ap-south-1": "internetmonitor.ap-south-1.api.aws",
            "ap-south-2": "internetmonitor.ap-south-2.api.aws",
            "ap-southeast-1": "internetmonitor.ap-southeast-1.api.aws",
            "ap-southeast-2": "internetmonitor.ap-southeast-2.api.aws",
            "ap-southeast-3": "internetmonitor.ap-southeast-3.api.aws",
            "ap-southeast-4": "internetmonitor.ap-southeast-4.api.aws",
            "ca-central-1": "internetmonitor.ca-central-1.api.aws",
            "eu-central-1": "internetmonitor.eu-central-1.api.aws",
            "eu-central-2": "internetmonitor.eu-central-2.api.aws",
            "eu-north-1": "internetmonitor.eu-north-1.api.aws",
            "eu-south-1": "internetmonitor.eu-south-1.api.aws",
            "eu-south-2": "internetmonitor.eu-south-2.api.aws",
            "eu-west-1": "internetmonitor.eu-west-1.api.aws",
            "eu-west-2": "internetmonitor.eu-west-2.api.aws",
            "eu-west-3": "internetmonitor.eu-west-3.api.aws",
            "me-central-1": "internetmonitor.me-central-1.api.aws",
            "me-south-1": "internetmonitor.me-south-1.api.aws",
            "sa-east-1": "internetmonitor.sa-east-1.api.aws",
            "us-east-1": "internetmonitor.us-east-1.api.aws",
            "us-east-2": "internetmonitor.us-east-2.api.aws",
            "us-west-1": "internetmonitor.us-west-1.api.aws",
            "us-west-2": "internetmonitor.us-west-2.api.aws"
        ]),
        [.dualstack, .fips]: .init(endpoints: [
            "ca-central-1": "internetmonitor-fips.ca-central-1.api.aws",
            "us-east-1": "internetmonitor-fips.us-east-1.api.aws",
            "us-east-2": "internetmonitor-fips.us-east-2.api.aws",
            "us-west-1": "internetmonitor-fips.us-west-1.api.aws",
            "us-west-2": "internetmonitor-fips.us-west-2.api.aws"
        ]),
        [.fips]: .init(endpoints: [
            "ap-east-2": "internetmonitor-fips.ap-east-2.api.aws",
            "ap-southeast-5": "internetmonitor-fips.ap-southeast-5.api.aws",
            "ap-southeast-7": "internetmonitor-fips.ap-southeast-7.api.aws",
            "ca-central-1": "internetmonitor-fips.ca-central-1.amazonaws.com",
            "ca-west-1": "internetmonitor-fips.ca-west-1.api.aws",
            "cn-north-1": "internetmonitor-fips.cn-north-1.api.amazonwebservices.com.cn",
            "cn-northwest-1": "internetmonitor-fips.cn-northwest-1.api.amazonwebservices.com.cn",
            "il-central-1": "internetmonitor-fips.il-central-1.api.aws",
            "mx-central-1": "internetmonitor-fips.mx-central-1.api.aws",
            "us-east-1": "internetmonitor-fips.us-east-1.amazonaws.com",
            "us-east-2": "internetmonitor-fips.us-east-2.amazonaws.com",
            "us-gov-east-1": "internetmonitor-fips.us-gov-east-1.api.aws",
            "us-gov-west-1": "internetmonitor-fips.us-gov-west-1.api.aws",
            "us-west-1": "internetmonitor-fips.us-west-1.amazonaws.com",
            "us-west-2": "internetmonitor-fips.us-west-2.amazonaws.com"
        ])
    ]}

    // MARK: API Calls

    /// Creates a monitor in Amazon CloudWatch Internet Monitor. A monitor is built based on information from the application resources that you add: VPCs,
    /// 			Network Load Balancers (NLBs), Amazon CloudFront distributions, and Amazon WorkSpaces directories. Internet Monitor then publishes internet measurements from Amazon Web Services
    /// 			that are specific to the city-networks. That is, the locations and ASNs (typically internet service providers or ISPs),
    /// 			where clients access your application. For more information, see Using Amazon CloudWatch Internet Monitor in the Amazon CloudWatch User
    /// 					Guide. When you create a monitor, you choose the percentage of traffic that you want to monitor. You can also set a maximum limit for the
    /// 			number of city-networks where client traffic is monitored, that caps the total traffic that Internet Monitor monitors. A city-network
    /// 			maximum is the limit of city-networks, but you only pay for the number of city-networks that are actually monitored. You can update your monitor
    /// 			at any time to change the percentage of traffic to monitor or the city-networks maximum. For more information, see Choosing a city-network maximum value in the Amazon CloudWatch User Guide.
    @Sendable
    @inlinable
    public func createMonitor(_ input: CreateMonitorInput, logger: Logger = AWSClient.loggingDisabled) async throws -> CreateMonitorOutput {
        try await self.client.execute(
            operation: "CreateMonitor", 
            path: "/v20210603/Monitors", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Creates a monitor in Amazon CloudWatch Internet Monitor. A monitor is built based on information from the application resources that you add: VPCs,
    /// 			Network Load Balancers (NLBs), Amazon CloudFront distributions, and Amazon WorkSpaces directories. Internet Monitor then publishes internet measurements from Amazon Web Services
    /// 			that are specific to the city-networks. That is, the locations and ASNs (typically internet service providers or ISPs),
    /// 			where clients access your application. For more information, see Using Amazon CloudWatch Internet Monitor in the Amazon CloudWatch User
    /// 					Guide. When you create a monitor, you choose the percentage of traffic that you want to monitor. You can also set a maximum limit for the
    /// 			number of city-networks where client traffic is monitored, that caps the total traffic that Internet Monitor monitors. A city-network
    /// 			maximum is the limit of city-networks, but you only pay for the number of city-networks that are actually monitored. You can update your monitor
    /// 			at any time to change the percentage of traffic to monitor or the city-networks maximum. For more information, see Choosing a city-network maximum value in the Amazon CloudWatch User Guide.
    ///
    /// Parameters:
    ///   - clientToken: A unique, case-sensitive string of up to 64 ASCII characters that you specify to make an idempotent API request. Don't reuse the same client token for
    ///   - healthEventsConfig: Defines the threshold percentages and other configuration information for when Amazon CloudWatch Internet Monitor creates a health event. Internet Monitor creates a
    ///   - internetMeasurementsLogDelivery: Publish internet measurements for Internet Monitor to an Amazon S3 bucket in addition to CloudWatch Logs.
    ///   - maxCityNetworksToMonitor: The maximum number of city-networks to monitor for your resources. A city-network is the location (city) where clients access your
    ///   - monitorName: The name of the monitor.
    ///   - resources: The resources to include in a monitor, which you provide as a set of Amazon Resource Names (ARNs). Resources can be VPCs, NLBs,
    ///   - tags: The tags for a monitor. You can add a maximum of 50 tags in Internet Monitor.
    ///   - trafficPercentageToMonitor: The percentage of the internet-facing traffic for your application that you want to monitor with this monitor. If you set a city-networks
    ///   - logger: Logger use during operation
    @inlinable
    public func createMonitor(
        clientToken: String? = CreateMonitorInput.idempotencyToken(),
        healthEventsConfig: HealthEventsConfig? = nil,
        internetMeasurementsLogDelivery: InternetMeasurementsLogDelivery? = nil,
        maxCityNetworksToMonitor: Int? = nil,
        monitorName: String,
        resources: [String]? = nil,
        tags: [String: String]? = nil,
        trafficPercentageToMonitor: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> CreateMonitorOutput {
        let input = CreateMonitorInput(
            clientToken: clientToken, 
            healthEventsConfig: healthEventsConfig, 
            internetMeasurementsLogDelivery: internetMeasurementsLogDelivery, 
            maxCityNetworksToMonitor: maxCityNetworksToMonitor, 
            monitorName: monitorName, 
            resources: resources, 
            tags: tags, 
            trafficPercentageToMonitor: trafficPercentageToMonitor
        )
        return try await self.createMonitor(input, logger: logger)
    }

    /// Deletes a monitor in Amazon CloudWatch Internet Monitor.
    @Sendable
    @inlinable
    public func deleteMonitor(_ input: DeleteMonitorInput, logger: Logger = AWSClient.loggingDisabled) async throws -> DeleteMonitorOutput {
        try await self.client.execute(
            operation: "DeleteMonitor", 
            path: "/v20210603/Monitors/{MonitorName}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes a monitor in Amazon CloudWatch Internet Monitor.
    ///
    /// Parameters:
    ///   - monitorName: The name of the monitor to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteMonitor(
        monitorName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DeleteMonitorOutput {
        let input = DeleteMonitorInput(
            monitorName: monitorName
        )
        return try await self.deleteMonitor(input, logger: logger)
    }

    /// Gets information that Amazon CloudWatch Internet Monitor has created and stored about a health event for a specified monitor. This information includes the impacted locations,
    /// 			and all the information related to the event, by location. The information returned includes the impact on performance, availability, and round-trip time, information about the network providers (ASNs),
    /// 			the event type, and so on. Information rolled up at the global traffic level is also returned, including the impact type and total traffic impact.
    @Sendable
    @inlinable
    public func getHealthEvent(_ input: GetHealthEventInput, logger: Logger = AWSClient.loggingDisabled) async throws -> GetHealthEventOutput {
        try await self.client.execute(
            operation: "GetHealthEvent", 
            path: "/v20210603/Monitors/{MonitorName}/HealthEvents/{EventId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets information that Amazon CloudWatch Internet Monitor has created and stored about a health event for a specified monitor. This information includes the impacted locations,
    /// 			and all the information related to the event, by location. The information returned includes the impact on performance, availability, and round-trip time, information about the network providers (ASNs),
    /// 			the event type, and so on. Information rolled up at the global traffic level is also returned, including the impact type and total traffic impact.
    ///
    /// Parameters:
    ///   - eventId: The internally-generated identifier of a health event. Because EventID contains the forward slash (“/”) character, you must
    ///   - linkedAccountId: The account ID for an account that you've set up cross-account sharing for in Amazon CloudWatch Internet Monitor. You configure cross-account
    ///   - monitorName: The name of the monitor.
    ///   - logger: Logger use during operation
    @inlinable
    public func getHealthEvent(
        eventId: String,
        linkedAccountId: String? = nil,
        monitorName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetHealthEventOutput {
        let input = GetHealthEventInput(
            eventId: eventId, 
            linkedAccountId: linkedAccountId, 
            monitorName: monitorName
        )
        return try await self.getHealthEvent(input, logger: logger)
    }

    /// Gets information that Amazon CloudWatch Internet Monitor has generated about an internet event. Internet Monitor displays information about
    /// 			recent global health events, called internet events, on a global outages map that is available to all Amazon Web Services
    /// 			customers.  The information returned here includes the impacted location,
    /// 			when the event started and (if the event is over) ended, the type of event (PERFORMANCE or AVAILABILITY),
    /// 			and the status (ACTIVE or RESOLVED).
    @Sendable
    @inlinable
    public func getInternetEvent(_ input: GetInternetEventInput, logger: Logger = AWSClient.loggingDisabled) async throws -> GetInternetEventOutput {
        try await self.client.execute(
            operation: "GetInternetEvent", 
            path: "/v20210603/InternetEvents/{EventId}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets information that Amazon CloudWatch Internet Monitor has generated about an internet event. Internet Monitor displays information about
    /// 			recent global health events, called internet events, on a global outages map that is available to all Amazon Web Services
    /// 			customers.  The information returned here includes the impacted location,
    /// 			when the event started and (if the event is over) ended, the type of event (PERFORMANCE or AVAILABILITY),
    /// 			and the status (ACTIVE or RESOLVED).
    ///
    /// Parameters:
    ///   - eventId: The EventId of the internet event to return information for.
    ///   - logger: Logger use during operation
    @inlinable
    public func getInternetEvent(
        eventId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetInternetEventOutput {
        let input = GetInternetEventInput(
            eventId: eventId
        )
        return try await self.getInternetEvent(input, logger: logger)
    }

    /// Gets information about a monitor in Amazon CloudWatch Internet Monitor based on a monitor name. The information returned includes the Amazon Resource Name (ARN), create time,
    /// 			modified time, resources included in the monitor, and status information.
    @Sendable
    @inlinable
    public func getMonitor(_ input: GetMonitorInput, logger: Logger = AWSClient.loggingDisabled) async throws -> GetMonitorOutput {
        try await self.client.execute(
            operation: "GetMonitor", 
            path: "/v20210603/Monitors/{MonitorName}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Gets information about a monitor in Amazon CloudWatch Internet Monitor based on a monitor name. The information returned includes the Amazon Resource Name (ARN), create time,
    /// 			modified time, resources included in the monitor, and status information.
    ///
    /// Parameters:
    ///   - linkedAccountId: The account ID for an account that you've set up cross-account sharing for in Amazon CloudWatch Internet Monitor. You configure cross-account
    ///   - monitorName: The name of the monitor.
    ///   - logger: Logger use during operation
    @inlinable
    public func getMonitor(
        linkedAccountId: String? = nil,
        monitorName: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetMonitorOutput {
        let input = GetMonitorInput(
            linkedAccountId: linkedAccountId, 
            monitorName: monitorName
        )
        return try await self.getMonitor(input, logger: logger)
    }

    /// Return the data for a query with the Amazon CloudWatch Internet Monitor query interface. Specify the query that you want to return results for by providing
    /// 			a QueryId and a monitor name. For more information about using the query interface, including examples, see
    /// 			Using the Amazon CloudWatch Internet Monitor query interface
    /// 			in the Amazon CloudWatch Internet Monitor User Guide.
    @Sendable
    @inlinable
    public func getQueryResults(_ input: GetQueryResultsInput, logger: Logger = AWSClient.loggingDisabled) async throws -> GetQueryResultsOutput {
        try await self.client.execute(
            operation: "GetQueryResults", 
            path: "/v20210603/Monitors/{MonitorName}/Queries/{QueryId}/Results", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Return the data for a query with the Amazon CloudWatch Internet Monitor query interface. Specify the query that you want to return results for by providing
    /// 			a QueryId and a monitor name. For more information about using the query interface, including examples, see
    /// 			Using the Amazon CloudWatch Internet Monitor query interface
    /// 			in the Amazon CloudWatch Internet Monitor User Guide.
    ///
    /// Parameters:
    ///   - maxResults: The number of query results that you want to return with this call.
    ///   - monitorName: The name of the monitor to return data for.
    ///   - nextToken: The token for the next set of results. You receive this token from a previous call.
    ///   - queryId: The ID of the query that you want to return data results for. A QueryId is an
    ///   - logger: Logger use during operation
    @inlinable
    public func getQueryResults(
        maxResults: Int? = nil,
        monitorName: String,
        nextToken: String? = nil,
        queryId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetQueryResultsOutput {
        let input = GetQueryResultsInput(
            maxResults: maxResults, 
            monitorName: monitorName, 
            nextToken: nextToken, 
            queryId: queryId
        )
        return try await self.getQueryResults(input, logger: logger)
    }

    /// Returns the current status of a query for the Amazon CloudWatch Internet Monitor query interface, for a specified query ID and monitor.
    /// 			When you run a query, check the status to make sure that the query has SUCCEEDED before you review the results.    QUEUED: The query is scheduled to run.    RUNNING: The query is in progress but not complete.    SUCCEEDED: The query completed sucessfully.    FAILED: The query failed due to an error.    CANCELED: The query was canceled.
    @Sendable
    @inlinable
    public func getQueryStatus(_ input: GetQueryStatusInput, logger: Logger = AWSClient.loggingDisabled) async throws -> GetQueryStatusOutput {
        try await self.client.execute(
            operation: "GetQueryStatus", 
            path: "/v20210603/Monitors/{MonitorName}/Queries/{QueryId}/Status", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the current status of a query for the Amazon CloudWatch Internet Monitor query interface, for a specified query ID and monitor.
    /// 			When you run a query, check the status to make sure that the query has SUCCEEDED before you review the results.    QUEUED: The query is scheduled to run.    RUNNING: The query is in progress but not complete.    SUCCEEDED: The query completed sucessfully.    FAILED: The query failed due to an error.    CANCELED: The query was canceled.
    ///
    /// Parameters:
    ///   - monitorName: The name of the monitor.
    ///   - queryId: The ID of the query that you want to return the status for. A QueryId is an internally-generated
    ///   - logger: Logger use during operation
    @inlinable
    public func getQueryStatus(
        monitorName: String,
        queryId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> GetQueryStatusOutput {
        let input = GetQueryStatusInput(
            monitorName: monitorName, 
            queryId: queryId
        )
        return try await self.getQueryStatus(input, logger: logger)
    }

    /// Lists all health events for a monitor in Amazon CloudWatch Internet Monitor. Returns information for health events including the event start and end times, and
    /// 			the status.  Health events that have start times during the time frame that is requested are not included in the list of health events.
    @Sendable
    @inlinable
    public func listHealthEvents(_ input: ListHealthEventsInput, logger: Logger = AWSClient.loggingDisabled) async throws -> ListHealthEventsOutput {
        try await self.client.execute(
            operation: "ListHealthEvents", 
            path: "/v20210603/Monitors/{MonitorName}/HealthEvents", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists all health events for a monitor in Amazon CloudWatch Internet Monitor. Returns information for health events including the event start and end times, and
    /// 			the status.  Health events that have start times during the time frame that is requested are not included in the list of health events.
    ///
    /// Parameters:
    ///   - endTime: The time when a health event ended. If the health event is still ongoing, then the end time is not set.
    ///   - eventStatus: The status of a health event.
    ///   - linkedAccountId: The account ID for an account that you've set up cross-account sharing for in Amazon CloudWatch Internet Monitor. You configure cross-account
    ///   - maxResults: The number of health event objects that you want to return with this call.
    ///   - monitorName: The name of the monitor.
    ///   - nextToken: The token for the next set of results. You receive this token from a previous call.
    ///   - startTime: The time when a health event started.
    ///   - logger: Logger use during operation
    @inlinable
    public func listHealthEvents(
        endTime: Date? = nil,
        eventStatus: HealthEventStatus? = nil,
        linkedAccountId: String? = nil,
        maxResults: Int? = nil,
        monitorName: String,
        nextToken: String? = nil,
        startTime: Date? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListHealthEventsOutput {
        let input = ListHealthEventsInput(
            endTime: endTime, 
            eventStatus: eventStatus, 
            linkedAccountId: linkedAccountId, 
            maxResults: maxResults, 
            monitorName: monitorName, 
            nextToken: nextToken, 
            startTime: startTime
        )
        return try await self.listHealthEvents(input, logger: logger)
    }

    /// Lists internet events that cause performance or availability issues for client locations. Amazon CloudWatch Internet Monitor displays information about
    /// 			recent global health events, called internet events, on a global outages map that is available to all Amazon Web Services
    /// 			customers.  You can constrain the list of internet events returned by providing a start time and end time to define a total
    /// 			time frame for events you want to list. Both start time and end time specify the time when an event started. End time
    /// 			is optional. If you don't include it, the default end time is the current time. You can also limit the events returned to a specific status
    /// 			(ACTIVE or RESOLVED) or type (PERFORMANCE or AVAILABILITY).
    @Sendable
    @inlinable
    public func listInternetEvents(_ input: ListInternetEventsInput, logger: Logger = AWSClient.loggingDisabled) async throws -> ListInternetEventsOutput {
        try await self.client.execute(
            operation: "ListInternetEvents", 
            path: "/v20210603/InternetEvents", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists internet events that cause performance or availability issues for client locations. Amazon CloudWatch Internet Monitor displays information about
    /// 			recent global health events, called internet events, on a global outages map that is available to all Amazon Web Services
    /// 			customers.  You can constrain the list of internet events returned by providing a start time and end time to define a total
    /// 			time frame for events you want to list. Both start time and end time specify the time when an event started. End time
    /// 			is optional. If you don't include it, the default end time is the current time. You can also limit the events returned to a specific status
    /// 			(ACTIVE or RESOLVED) or type (PERFORMANCE or AVAILABILITY).
    ///
    /// Parameters:
    ///   - endTime: The end time of the time window that you want to get a list of internet events for.
    ///   - eventStatus: The status of an internet event.
    ///   - eventType: The type of network impairment.
    ///   - maxResults: The number of query results that you want to return with this call.
    ///   - nextToken: The token for the next set of results. You receive this token from a previous call.
    ///   - startTime: The start time of the time window that you want to get a list of internet events for.
    ///   - logger: Logger use during operation
    @inlinable
    public func listInternetEvents(
        endTime: Date? = nil,
        eventStatus: String? = nil,
        eventType: String? = nil,
        maxResults: Int? = nil,
        nextToken: String? = nil,
        startTime: Date? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListInternetEventsOutput {
        let input = ListInternetEventsInput(
            endTime: endTime, 
            eventStatus: eventStatus, 
            eventType: eventType, 
            maxResults: maxResults, 
            nextToken: nextToken, 
            startTime: startTime
        )
        return try await self.listInternetEvents(input, logger: logger)
    }

    /// Lists all of your monitors for Amazon CloudWatch Internet Monitor and their statuses, along with the Amazon Resource Name (ARN) and name of each monitor.
    @Sendable
    @inlinable
    public func listMonitors(_ input: ListMonitorsInput, logger: Logger = AWSClient.loggingDisabled) async throws -> ListMonitorsOutput {
        try await self.client.execute(
            operation: "ListMonitors", 
            path: "/v20210603/Monitors", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists all of your monitors for Amazon CloudWatch Internet Monitor and their statuses, along with the Amazon Resource Name (ARN) and name of each monitor.
    ///
    /// Parameters:
    ///   - includeLinkedAccounts: A boolean option that you can set to TRUE to include monitors for linked accounts in a list of
    ///   - maxResults: The number of monitor objects that you want to return with this call.
    ///   - monitorStatus: The status of a monitor. This includes the status of the data processing for the monitor and the status of the monitor itself. For information about the statuses for a monitor, see
    ///   - nextToken: The token for the next set of results. You receive this token from a previous call.
    ///   - logger: Logger use during operation
    @inlinable
    public func listMonitors(
        includeLinkedAccounts: Bool? = nil,
        maxResults: Int? = nil,
        monitorStatus: String? = nil,
        nextToken: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListMonitorsOutput {
        let input = ListMonitorsInput(
            includeLinkedAccounts: includeLinkedAccounts, 
            maxResults: maxResults, 
            monitorStatus: monitorStatus, 
            nextToken: nextToken
        )
        return try await self.listMonitors(input, logger: logger)
    }

    /// Lists the tags for a resource. Tags are supported only for monitors in Amazon CloudWatch Internet Monitor.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceInput, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceOutput {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/tags/{ResourceArn}", 
            httpMethod: .GET, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Lists the tags for a resource. Tags are supported only for monitors in Amazon CloudWatch Internet Monitor.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) for a resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceOutput {
        let input = ListTagsForResourceInput(
            resourceArn: resourceArn
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Start a query to return data for a specific query type for the Amazon CloudWatch Internet Monitor query interface. Specify a time period
    /// 			for the data that you want returned by using StartTime and EndTime. You filter the query
    /// 			results to return by providing parameters that you specify with FilterParameters. For more information about using the query interface, including examples, see
    /// 			Using the Amazon CloudWatch Internet Monitor query interface
    /// 		in the Amazon CloudWatch Internet Monitor User Guide.
    @Sendable
    @inlinable
    public func startQuery(_ input: StartQueryInput, logger: Logger = AWSClient.loggingDisabled) async throws -> StartQueryOutput {
        try await self.client.execute(
            operation: "StartQuery", 
            path: "/v20210603/Monitors/{MonitorName}/Queries", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Start a query to return data for a specific query type for the Amazon CloudWatch Internet Monitor query interface. Specify a time period
    /// 			for the data that you want returned by using StartTime and EndTime. You filter the query
    /// 			results to return by providing parameters that you specify with FilterParameters. For more information about using the query interface, including examples, see
    /// 			Using the Amazon CloudWatch Internet Monitor query interface
    /// 		in the Amazon CloudWatch Internet Monitor User Guide.
    ///
    /// Parameters:
    ///   - endTime: The timestamp that is the end of the period that you want to retrieve data for with your query.
    ///   - filterParameters: The FilterParameters field that you use with Amazon CloudWatch Internet Monitor queries is a string the defines
    ///   - linkedAccountId: The account ID for an account that you've set up cross-account sharing for in Amazon CloudWatch Internet Monitor. You configure cross-account
    ///   - monitorName: The name of the monitor to query.
    ///   - queryType: The type of query to run. The following are the three types of queries that you can run using the Internet Monitor query interface:    MEASUREMENTS: Provides availability score, performance score, total traffic,
    ///   - startTime: The timestamp that is the beginning of the period that you want to retrieve data for with your query.
    ///   - logger: Logger use during operation
    @inlinable
    public func startQuery(
        endTime: Date,
        filterParameters: [FilterParameter]? = nil,
        linkedAccountId: String? = nil,
        monitorName: String,
        queryType: QueryType,
        startTime: Date,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> StartQueryOutput {
        let input = StartQueryInput(
            endTime: endTime, 
            filterParameters: filterParameters, 
            linkedAccountId: linkedAccountId, 
            monitorName: monitorName, 
            queryType: queryType, 
            startTime: startTime
        )
        return try await self.startQuery(input, logger: logger)
    }

    /// Stop a query that is progress for a specific monitor.
    @Sendable
    @inlinable
    public func stopQuery(_ input: StopQueryInput, logger: Logger = AWSClient.loggingDisabled) async throws -> StopQueryOutput {
        try await self.client.execute(
            operation: "StopQuery", 
            path: "/v20210603/Monitors/{MonitorName}/Queries/{QueryId}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Stop a query that is progress for a specific monitor.
    ///
    /// Parameters:
    ///   - monitorName: The name of the monitor.
    ///   - queryId: The ID of the query that you want to stop. A QueryId is an internally-generated identifier for a specific query.
    ///   - logger: Logger use during operation
    @inlinable
    public func stopQuery(
        monitorName: String,
        queryId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> StopQueryOutput {
        let input = StopQueryInput(
            monitorName: monitorName, 
            queryId: queryId
        )
        return try await self.stopQuery(input, logger: logger)
    }

    /// Adds a tag to a resource. Tags are supported only for monitors in Amazon CloudWatch Internet Monitor. You can add a maximum of 50 tags in Internet Monitor. A minimum of one tag is required for this call. It returns an error if you use the TagResource request with 0 tags.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceInput, logger: Logger = AWSClient.loggingDisabled) async throws -> TagResourceOutput {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/tags/{ResourceArn}", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Adds a tag to a resource. Tags are supported only for monitors in Amazon CloudWatch Internet Monitor. You can add a maximum of 50 tags in Internet Monitor. A minimum of one tag is required for this call. It returns an error if you use the TagResource request with 0 tags.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) for a tag that you add to a resource. Tags are supported only for monitors in Amazon CloudWatch Internet Monitor.
    ///   - tags: Tags that you add to a resource. You can add a maximum of 50 tags in Internet Monitor.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceArn: String,
        tags: [String: String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> TagResourceOutput {
        let input = TagResourceInput(
            resourceArn: resourceArn, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Removes a tag from a resource.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceInput, logger: Logger = AWSClient.loggingDisabled) async throws -> UntagResourceOutput {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/tags/{ResourceArn}", 
            httpMethod: .DELETE, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Removes a tag from a resource.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) for a tag you remove a resource from.
    ///   - tagKeys: Tag keys that you remove from a resource.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceArn: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UntagResourceOutput {
        let input = UntagResourceInput(
            resourceArn: resourceArn, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }

    /// Updates a monitor. You can update a monitor to change the percentage of traffic to monitor or the maximum number of city-networks
    /// 			(locations and ASNs), to add or remove resources, or to change the status of the monitor. Note that you can't change the name of a monitor. The city-network maximum that you choose is the limit, but you only pay for the number of city-networks that are actually monitored.
    /// 			For more information, see Choosing a city-network maximum value in the Amazon CloudWatch User Guide.
    @Sendable
    @inlinable
    public func updateMonitor(_ input: UpdateMonitorInput, logger: Logger = AWSClient.loggingDisabled) async throws -> UpdateMonitorOutput {
        try await self.client.execute(
            operation: "UpdateMonitor", 
            path: "/v20210603/Monitors/{MonitorName}", 
            httpMethod: .PATCH, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Updates a monitor. You can update a monitor to change the percentage of traffic to monitor or the maximum number of city-networks
    /// 			(locations and ASNs), to add or remove resources, or to change the status of the monitor. Note that you can't change the name of a monitor. The city-network maximum that you choose is the limit, but you only pay for the number of city-networks that are actually monitored.
    /// 			For more information, see Choosing a city-network maximum value in the Amazon CloudWatch User Guide.
    ///
    /// Parameters:
    ///   - clientToken: A unique, case-sensitive string of up to 64 ASCII characters that you specify to make an idempotent API request. You should not reuse the same client
    ///   - healthEventsConfig: The list of health score thresholds. A threshold percentage for health scores, along with other configuration information,
    ///   - internetMeasurementsLogDelivery: Publish internet measurements for Internet Monitor to another location, such as an Amazon S3 bucket. The measurements are also published to Amazon CloudWatch Logs.
    ///   - maxCityNetworksToMonitor: The maximum number of city-networks to monitor for your application. A city-network is the location (city) where clients access your
    ///   - monitorName: The name of the monitor.
    ///   - resourcesToAdd: The resources to include in a monitor, which you provide as a set of Amazon Resource Names (ARNs). Resources can be VPCs, NLBs,
    ///   - resourcesToRemove: The resources to remove from a monitor, which you provide as a set of Amazon Resource Names (ARNs).
    ///   - status: The status for a monitor. The accepted values for Status with the UpdateMonitor API call are the following: ACTIVE and
    ///   - trafficPercentageToMonitor: The percentage of the internet-facing traffic for your application that you want to monitor with this monitor. If you set a city-networks
    ///   - logger: Logger use during operation
    @inlinable
    public func updateMonitor(
        clientToken: String? = UpdateMonitorInput.idempotencyToken(),
        healthEventsConfig: HealthEventsConfig? = nil,
        internetMeasurementsLogDelivery: InternetMeasurementsLogDelivery? = nil,
        maxCityNetworksToMonitor: Int? = nil,
        monitorName: String,
        resourcesToAdd: [String]? = nil,
        resourcesToRemove: [String]? = nil,
        status: MonitorConfigState? = nil,
        trafficPercentageToMonitor: Int? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> UpdateMonitorOutput {
        let input = UpdateMonitorInput(
            clientToken: clientToken, 
            healthEventsConfig: healthEventsConfig, 
            internetMeasurementsLogDelivery: internetMeasurementsLogDelivery, 
            maxCityNetworksToMonitor: maxCityNetworksToMonitor, 
            monitorName: monitorName, 
            resourcesToAdd: resourcesToAdd, 
            resourcesToRemove: resourcesToRemove, 
            status: status, 
            trafficPercentageToMonitor: trafficPercentageToMonitor
        )
        return try await self.updateMonitor(input, logger: logger)
    }
}

extension InternetMonitor {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: InternetMonitor, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension InternetMonitor {
    /// Return PaginatorSequence for operation ``getQueryResults(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func getQueryResultsPaginator(
        _ input: GetQueryResultsInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<GetQueryResultsInput, GetQueryResultsOutput> {
        return .init(
            input: input,
            command: self.getQueryResults,
            inputKey: \GetQueryResultsInput.nextToken,
            outputKey: \GetQueryResultsOutput.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``getQueryResults(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maxResults: The number of query results that you want to return with this call.
    ///   - monitorName: The name of the monitor to return data for.
    ///   - queryId: The ID of the query that you want to return data results for. A QueryId is an
    ///   - logger: Logger used for logging
    @inlinable
    public func getQueryResultsPaginator(
        maxResults: Int? = nil,
        monitorName: String,
        queryId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<GetQueryResultsInput, GetQueryResultsOutput> {
        let input = GetQueryResultsInput(
            maxResults: maxResults, 
            monitorName: monitorName, 
            queryId: queryId
        )
        return self.getQueryResultsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listHealthEvents(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listHealthEventsPaginator(
        _ input: ListHealthEventsInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListHealthEventsInput, ListHealthEventsOutput> {
        return .init(
            input: input,
            command: self.listHealthEvents,
            inputKey: \ListHealthEventsInput.nextToken,
            outputKey: \ListHealthEventsOutput.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listHealthEvents(_:logger:)``.
    ///
    /// - Parameters:
    ///   - endTime: The time when a health event ended. If the health event is still ongoing, then the end time is not set.
    ///   - eventStatus: The status of a health event.
    ///   - linkedAccountId: The account ID for an account that you've set up cross-account sharing for in Amazon CloudWatch Internet Monitor. You configure cross-account
    ///   - maxResults: The number of health event objects that you want to return with this call.
    ///   - monitorName: The name of the monitor.
    ///   - startTime: The time when a health event started.
    ///   - logger: Logger used for logging
    @inlinable
    public func listHealthEventsPaginator(
        endTime: Date? = nil,
        eventStatus: HealthEventStatus? = nil,
        linkedAccountId: String? = nil,
        maxResults: Int? = nil,
        monitorName: String,
        startTime: Date? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListHealthEventsInput, ListHealthEventsOutput> {
        let input = ListHealthEventsInput(
            endTime: endTime, 
            eventStatus: eventStatus, 
            linkedAccountId: linkedAccountId, 
            maxResults: maxResults, 
            monitorName: monitorName, 
            startTime: startTime
        )
        return self.listHealthEventsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listInternetEvents(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listInternetEventsPaginator(
        _ input: ListInternetEventsInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListInternetEventsInput, ListInternetEventsOutput> {
        return .init(
            input: input,
            command: self.listInternetEvents,
            inputKey: \ListInternetEventsInput.nextToken,
            outputKey: \ListInternetEventsOutput.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listInternetEvents(_:logger:)``.
    ///
    /// - Parameters:
    ///   - endTime: The end time of the time window that you want to get a list of internet events for.
    ///   - eventStatus: The status of an internet event.
    ///   - eventType: The type of network impairment.
    ///   - maxResults: The number of query results that you want to return with this call.
    ///   - startTime: The start time of the time window that you want to get a list of internet events for.
    ///   - logger: Logger used for logging
    @inlinable
    public func listInternetEventsPaginator(
        endTime: Date? = nil,
        eventStatus: String? = nil,
        eventType: String? = nil,
        maxResults: Int? = nil,
        startTime: Date? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListInternetEventsInput, ListInternetEventsOutput> {
        let input = ListInternetEventsInput(
            endTime: endTime, 
            eventStatus: eventStatus, 
            eventType: eventType, 
            maxResults: maxResults, 
            startTime: startTime
        )
        return self.listInternetEventsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listMonitors(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listMonitorsPaginator(
        _ input: ListMonitorsInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListMonitorsInput, ListMonitorsOutput> {
        return .init(
            input: input,
            command: self.listMonitors,
            inputKey: \ListMonitorsInput.nextToken,
            outputKey: \ListMonitorsOutput.nextToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listMonitors(_:logger:)``.
    ///
    /// - Parameters:
    ///   - includeLinkedAccounts: A boolean option that you can set to TRUE to include monitors for linked accounts in a list of
    ///   - maxResults: The number of monitor objects that you want to return with this call.
    ///   - monitorStatus: The status of a monitor. This includes the status of the data processing for the monitor and the status of the monitor itself. For information about the statuses for a monitor, see
    ///   - logger: Logger used for logging
    @inlinable
    public func listMonitorsPaginator(
        includeLinkedAccounts: Bool? = nil,
        maxResults: Int? = nil,
        monitorStatus: String? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListMonitorsInput, ListMonitorsOutput> {
        let input = ListMonitorsInput(
            includeLinkedAccounts: includeLinkedAccounts, 
            maxResults: maxResults, 
            monitorStatus: monitorStatus
        )
        return self.listMonitorsPaginator(input, logger: logger)
    }
}

extension InternetMonitor.GetQueryResultsInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> InternetMonitor.GetQueryResultsInput {
        return .init(
            maxResults: self.maxResults,
            monitorName: self.monitorName,
            nextToken: token,
            queryId: self.queryId
        )
    }
}

extension InternetMonitor.ListHealthEventsInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> InternetMonitor.ListHealthEventsInput {
        return .init(
            endTime: self.endTime,
            eventStatus: self.eventStatus,
            linkedAccountId: self.linkedAccountId,
            maxResults: self.maxResults,
            monitorName: self.monitorName,
            nextToken: token,
            startTime: self.startTime
        )
    }
}

extension InternetMonitor.ListInternetEventsInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> InternetMonitor.ListInternetEventsInput {
        return .init(
            endTime: self.endTime,
            eventStatus: self.eventStatus,
            eventType: self.eventType,
            maxResults: self.maxResults,
            nextToken: token,
            startTime: self.startTime
        )
    }
}

extension InternetMonitor.ListMonitorsInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> InternetMonitor.ListMonitorsInput {
        return .init(
            includeLinkedAccounts: self.includeLinkedAccounts,
            maxResults: self.maxResults,
            monitorStatus: self.monitorStatus,
            nextToken: token
        )
    }
}
